﻿namespace WMS6.Web.Inventory
{
    using System;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using WMS6.Web;

    public class TransferQuery : BasePage
    {
        protected Button btnExport;
        protected Button btnList;
        protected Button btnNew;
        protected Button btnSearch;
        protected DropDownList ddlStatusOper;
        protected DropDownList ddlTransferIDOper;
        protected DropDownList ddlTransferTypeOper;
        protected HtmlForm F5060;
        protected HtmlInputHidden hdnActionID;
        protected Label lblInvTransfer;
        protected Label lblStatus;
        protected Label lblTransferID;
        protected Label lblTransferType;
        protected HtmlLink mycss;
        protected ScriptManager ScriptManager1;
        protected TextBox txtStatus;
        protected TextBox txtTransferID;
        protected TextBox txtTransferType;

        protected void btnSearch_Click(object sender, EventArgs e)
        {
            base.Server.Transfer("TransferList.aspx", false);
        }

        private void InitDropDownLists()
        {
            base.InitQueryDDL(this.ddlStatusOper, 0);
            base.InitQueryDDL(this.ddlTransferIDOper, 0);
            base.InitQueryDDL(this.ddlTransferTypeOper, 0);
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                base.InitPage(this.Page);
                this.InitDropDownLists();
            }
        }

        public string Status
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtStatus.Text.Trim()))
                {
                    return base.GetParamsString(this.txtStatus.Text.Trim(), this.ddlStatusOper.SelectedValue);
                }
                return "";
            }
        }

        public string TransferID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtTransferID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtTransferID.Text.Trim(), this.ddlTransferIDOper.SelectedValue);
                }
                return "";
            }
        }

        public string TransferType
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtTransferType.Text.Trim()))
                {
                    return base.GetParamsString(this.txtTransferType.Text.Trim(), this.ddlTransferTypeOper.SelectedValue);
                }
                return "";
            }
        }
    }
}

